<?php
header('content-type:text/html;charset=utf-8');

$con = mysql_connect("localhost", "root", "root");
if (!$con) {
    die('Could not connect: ' . mysql_error());
}
// some code
mysql_select_db("test", $con);
//$result = mysql_query("SELECT * FROM table01");

$result = mysql_query("SELECT max(`lastnum`) as max FROM `table01`");

$row = mysql_fetch_array($result);

echo $row[0]+15;

echo("<script>console.log('".$row[0]."');</script>");
mysql_close($con);
?> 
